<%@page contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@page import="sf.event.model.*"%>

<jsp:useBean id="events" type="sf.event.model.EventList" scope="request" />

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
    <title>spring-jpa-tutorial Web Application</title>
    <style type="text/css">
        table, th, td {
            font-family: sans-serif;
            font-size: 8pt;        
            border-collapse: collapse;
            border: 1px solid #aaa;
            margin: 2px;
            padding: 2px;
        }
    </style>
</head>

<body>
	<table border="1">
		<thead>
			<tr>
				<th>ID</th>
				<th>Name</th>
				<th>Start Date</th>
				<th>Duration</th>
			</tr>
		</thead>
		<%
			for (final Event event : events) {
		%>
		<tr>
			<td><% out.print(event.getId()); %></td>
			<td><% out.print(event.getName()); %></td>
			<td><% out.print(event.getStartDate()); %></td>
			<td><% out.print(event.getDuration()); %></td>
		</tr>
		<%
			}
		%>
	</table>
</body>
</html>